#include <iostream>
using namespace std;
int main()
{
    __int64 C(__int64,__int64),n,i,j;
    while (cin>>n)
    {
        for (i=0;i<n;i++)
        {
            for (j=0;j<=i;j++)
            {
                cout<<C(i,j);
                if (j!=i)cout<<" ";
            }
            cout<<endl;
        }
        cout<<endl;
    }
    return 0;
}
__int64 C(__int64 n,__int64 m)
{
    __int64 i,t=1;
    if (m>n/2)m=n-m;
    if (m==0)return 1;
    for (i=n;i>n-m;i--)t*=i;
    for (i=2;i<=m;i++)t/=i;
    return t;
}